/**
 * 
 */
package com.great.meal.search.domain;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author lenovo
 *
 */
@Entity
@Table(name="t_dish")
public class Dish implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1489731787362705506L;
	private Long dishId;
	private String dishName;
	private Double money;
	private String description;
	private Boolean status; //true表示有.
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public Long getDishId() {
		return dishId;
	}
	public void setDishId(Long dishId) {
		this.dishId = dishId;
	}
	public String getDishName() {
		return dishName;
	}
	
	public void setDishName(String dishName) {
		this.dishName = dishName;
	}
	
	public Double getMoney() {
		return money;
	}
	
	public void setMoney(Double money) {
		this.money = money;
	}
	
	public String getDescription() {
		return description;
	}
	
	public void setDescription(String description) {
		this.description = description;
	}
	
	public Boolean getStatus() {
		return status;
	}
	
	public void setStatus(Boolean status) {
		this.status = status;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)  return true;
		if (!(obj instanceof Dish)) return false;

		final Dish dish = (Dish) obj;

		if (!dish.getDishId().equals(getDishId()))  return false;
		if (!dish.getStatus().equals(getStatus()))  return false;
		if (!dish.getDescription().equals(getDescription()))  return false;
		if (!dish.getDishName().equals(getDishName()))  return false;
		if (!dish.getMoney().equals(getMoney()))  return false;
		
		return true;
	}
	@Override
	public int hashCode() {
		int result = dishId != null ? dishId.hashCode() : 0;
		result = 31 * result + (dishName != null ? dishName.hashCode() : 0);
		result = 31 * result + (money != null ? money.hashCode() : 0);
		result = 31 * result + (description != null ? description.hashCode() : 0);
		result = 31 * result + (status != null ? status.hashCode() : 0);
		return result;
	}

}
